<template>
	<view class="max">
		<view class="tx" v-html="txt"></view>
	</view>
</template>

<script>
	 export default {
		 data(){
			 return {
				 txt:'',
				 key:''

			 }
		 },
		 onLoad(e){
			 console.log(e.key,'协议');
			 this.key = e.key
			 this.gettx()
		 },
		 methods:{
			 gettx(){
				if(this.key==0){
					this.$api.gettx().then(res=>{
							this.txt = res.data.user_agreement
					})
				}
				if(this.key==1){
					this.$api.getuserxy().then(res=>{
							this.txt = res.data.about_ud
					})
				}
				if(this.key==2){
					this.$api.getuserys().then(res=>{
							this.txt = res.data.customer_phone
					})
				}
			 }
		 }
	 }
</script>

<style lang="scss" scoped>
	.max{
		margin: 20rpx;
		.tx{
			text-indent: 2em;
		}
	}

</style>